using System;
using UnityEngine;
    /// <summary>
    /// 基本类型Get和Set
    /// </summary>
    public partial class AbsESF_Animator
    {
        /// <summary>
        /// SetFloat
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <param name="_value">值</param>
        public void SetFloat(enESF_AnimatorControllerParameter _parameter, float _value)
        {    
            animator?.SetFloat((int)_parameter, _value);
        }
        /// <summary>
        /// GetFloat
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <returns>float</returns>
        public float GetFloat(enESF_AnimatorControllerParameter _parameter)
        {    
            return animator?.GetFloat((int)_parameter)??default;
        }
        /// <summary>
        /// SetInteger
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <param name="_value">值</param>
        public void SetInteger(enESF_AnimatorControllerParameter _parameter, int _value)
        {
            animator?.SetInteger((int)_parameter, _value);
        }
        /// <summary>
        /// GetInteger
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <returns>int</returns>
        public int GetInteger(enESF_AnimatorControllerParameter _parameter)
        {    
            return animator?.GetInteger((int)_parameter)??default;
        }
        /// <summary>
        /// SetBool
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <param name="_value">值</param>
        public void SetBool(enESF_AnimatorControllerParameter _parameter, bool _value)
        {
            animator?.SetBool((int)_parameter, _value);
        }
        /// <summary>
        /// GetBool
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <returns>bool</returns>
        public bool GetBool(enESF_AnimatorControllerParameter _parameter)
        {    
            return animator?.GetBool((int)_parameter)??default;
        }
        /// <summary>
        /// SetTrigger
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <param name="_value">值</param>
        public void SetTrigger(enESF_AnimatorControllerParameter _parameter,bool _value)
        {
            if (_value)
            {
                SetTrigger(_parameter);
            }
            else
            {
                ResetTrigger(_parameter);
            }
        }
        /// <summary>
        /// SetTrigger
        /// </summary>
        /// <param name="_parameter">参数</param>
        public void SetTrigger(enESF_AnimatorControllerParameter _parameter)
        {
            animator?.SetTrigger((int)_parameter);
        }
        /// <summary>
        /// ResetTrigger
        /// </summary>
        /// <param name="_parameter">参数</param>
        public void ResetTrigger(enESF_AnimatorControllerParameter _parameter)
        {
            animator?.ResetTrigger((int)_parameter);
        }
        /// <summary>
        /// GetTrigger
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <returns>true:触发状态,false:非触发状态</returns>
        public bool GetTrigger(enESF_AnimatorControllerParameter _parameter)
        {
            return GetBool(_parameter);
        }
    }
    
    //==============================分隔线========================================================
    /// <summary>
    /// 参数Get和Set
    /// </summary>
    public partial class AbsESF_Animator
    {
        /// <summary>
        /// 设置参数值
        /// </summary>
        /// <param name="_parameter">参数</param>
        /// <param name="_value">值</param>
        public void SetParameter(enESF_AnimatorControllerParameter _parameter, object _value)
        {
            switch(_parameter)
            {
                                        
                            case enESF_AnimatorControllerParameter.Int_RandomIdle:
                                SetInt_RandomIdle ((int) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Bool_Moving:
                                SetBool_Moving ((bool) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Bool_Jumping:
                                SetBool_Jumping ((bool) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Float_JumpSpeed:
                                SetFloat_JumpSpeed ((float) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Float_LaneSwitch:
                                SetFloat_LaneSwitch ((float) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Bool_Dead:
                                SetBool_Dead ((bool) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Trigger_Hit:
                                SetTrigger_Hit ((bool) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Bool_Sliding:
                                SetBool_Sliding ((bool) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Int_RandomDeath:
                                SetInt_RandomDeath ((int) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Float_Blend:
                                SetFloat_Blend ((float) _value);
                                break;
                                       
                            case enESF_AnimatorControllerParameter.Trigger_next:
                                SetTrigger_next ((bool) _value);
                                break;
               
            }
        }
        
                    /// <summary>
                    /// 设置Int_RandomIdle值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetInt_RandomIdle (int _value)
                    {
                         SetInteger(enESF_AnimatorControllerParameter.Int_RandomIdle, _value);
                    }
                    /// <summary>
                    /// 获得Int_RandomIdle值
                    /// </summary>
                    /// <returns>值</returns>
                    public int GetInt_RandomIdle ()
                    {
                        return GetInteger(enESF_AnimatorControllerParameter.Int_RandomIdle);
                    }
        
                    /// <summary>
                    /// 设置Bool_Moving值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetBool_Moving (bool _value)
                    {
                         SetBool(enESF_AnimatorControllerParameter.Bool_Moving, _value);
                    }
                    /// <summary>
                    /// 获得Bool_Moving值
                    /// </summary>
                    /// <returns>值</returns>
                    public bool GetBool_Moving ()
                    {
                        return GetBool(enESF_AnimatorControllerParameter.Bool_Moving);
                    }
        
                    /// <summary>
                    /// 设置Bool_Jumping值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetBool_Jumping (bool _value)
                    {
                         SetBool(enESF_AnimatorControllerParameter.Bool_Jumping, _value);
                    }
                    /// <summary>
                    /// 获得Bool_Jumping值
                    /// </summary>
                    /// <returns>值</returns>
                    public bool GetBool_Jumping ()
                    {
                        return GetBool(enESF_AnimatorControllerParameter.Bool_Jumping);
                    }
        
                    /// <summary>
                    /// 设置Float_JumpSpeed值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetFloat_JumpSpeed (float _value)
                    {
                         SetFloat(enESF_AnimatorControllerParameter.Float_JumpSpeed, _value);
                    }
                    /// <summary>
                    /// 获得Float_JumpSpeed值
                    /// </summary>
                    /// <returns>值</returns>
                    public float GetFloat_JumpSpeed ()
                    {
                        return GetFloat(enESF_AnimatorControllerParameter.Float_JumpSpeed);
                    }
        
                    /// <summary>
                    /// 设置Float_LaneSwitch值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetFloat_LaneSwitch (float _value)
                    {
                         SetFloat(enESF_AnimatorControllerParameter.Float_LaneSwitch, _value);
                    }
                    /// <summary>
                    /// 获得Float_LaneSwitch值
                    /// </summary>
                    /// <returns>值</returns>
                    public float GetFloat_LaneSwitch ()
                    {
                        return GetFloat(enESF_AnimatorControllerParameter.Float_LaneSwitch);
                    }
        
                    /// <summary>
                    /// 设置Bool_Dead值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetBool_Dead (bool _value)
                    {
                         SetBool(enESF_AnimatorControllerParameter.Bool_Dead, _value);
                    }
                    /// <summary>
                    /// 获得Bool_Dead值
                    /// </summary>
                    /// <returns>值</returns>
                    public bool GetBool_Dead ()
                    {
                        return GetBool(enESF_AnimatorControllerParameter.Bool_Dead);
                    }
        
                    /// <summary>
                    /// 设置Trigger_Hit值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetTrigger_Hit (bool _value)
                    {
                        if (_value)
                        {
                            SetTrigger_Hit();
                        }
                        else
                        {
                            ResetTrigger_Hit();
                        }
                    }
                    /// <summary>
                    /// 设置Trigger_Hit值
                    /// </summary>
                    public void SetTrigger_Hit ()
                    {
                        SetTrigger(enESF_AnimatorControllerParameter.Trigger_Hit);
                    }
                    /// <summary>
                    /// 重置Trigger_Hit值
                    /// </summary>
                    public void ResetTrigger_Hit ()
                    {
                        ResetTrigger(enESF_AnimatorControllerParameter.Trigger_Hit);
                    }
                    /// <summary>
                    /// 获得Trigger_Hit值
                    /// </summary>
                    /// <returns>值</returns>
                    public bool GetTrigger_Hit ()
                    {
                         return GetTrigger(enESF_AnimatorControllerParameter.Trigger_Hit);
                    }
        
                    /// <summary>
                    /// 设置Bool_Sliding值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetBool_Sliding (bool _value)
                    {
                         SetBool(enESF_AnimatorControllerParameter.Bool_Sliding, _value);
                    }
                    /// <summary>
                    /// 获得Bool_Sliding值
                    /// </summary>
                    /// <returns>值</returns>
                    public bool GetBool_Sliding ()
                    {
                        return GetBool(enESF_AnimatorControllerParameter.Bool_Sliding);
                    }
        
                    /// <summary>
                    /// 设置Int_RandomDeath值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetInt_RandomDeath (int _value)
                    {
                         SetInteger(enESF_AnimatorControllerParameter.Int_RandomDeath, _value);
                    }
                    /// <summary>
                    /// 获得Int_RandomDeath值
                    /// </summary>
                    /// <returns>值</returns>
                    public int GetInt_RandomDeath ()
                    {
                        return GetInteger(enESF_AnimatorControllerParameter.Int_RandomDeath);
                    }
        
                    /// <summary>
                    /// 设置Float_Blend值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetFloat_Blend (float _value)
                    {
                         SetFloat(enESF_AnimatorControllerParameter.Float_Blend, _value);
                    }
                    /// <summary>
                    /// 获得Float_Blend值
                    /// </summary>
                    /// <returns>值</returns>
                    public float GetFloat_Blend ()
                    {
                        return GetFloat(enESF_AnimatorControllerParameter.Float_Blend);
                    }
        
                    /// <summary>
                    /// 设置Trigger_next值
                    /// </summary>
                    /// <param name="_value">值</param>
                    public void SetTrigger_next (bool _value)
                    {
                        if (_value)
                        {
                            SetTrigger_next();
                        }
                        else
                        {
                            ResetTrigger_next();
                        }
                    }
                    /// <summary>
                    /// 设置Trigger_next值
                    /// </summary>
                    public void SetTrigger_next ()
                    {
                        SetTrigger(enESF_AnimatorControllerParameter.Trigger_next);
                    }
                    /// <summary>
                    /// 重置Trigger_next值
                    /// </summary>
                    public void ResetTrigger_next ()
                    {
                        ResetTrigger(enESF_AnimatorControllerParameter.Trigger_next);
                    }
                    /// <summary>
                    /// 获得Trigger_next值
                    /// </summary>
                    /// <returns>值</returns>
                    public bool GetTrigger_next ()
                    {
                         return GetTrigger(enESF_AnimatorControllerParameter.Trigger_next);
                    }
        
    }